package com.woniu.server.impl;


import com.woniu.dao.GoodsMapper;
import com.woniu.dto.RestCom;
import com.woniu.pojo.*;
import com.woniu.server.GoodsServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class GoodServerImpl implements GoodsServer {

   @Autowired
    GoodsMapper goodsMapper;






    @Override
    public void addshop(Addgoods goods) {


        goodsMapper.addshop(goods);
    }





    @Override
    public FindGoods findOne(int id) {

        return goodsMapper.findOne(id);
    }

    @Override
    public  List<RestCom> findCom(int id) {


        return goodsMapper.findCom(id);
    }

    @Override
    public int findlikenum(int id) {


        return goodsMapper.findlikenum(id);
    }

    @Override
    public void updatalikenum(int id, int likenum) {

        goodsMapper.updatalikenum( id,likenum);
    }
}
